libxlu_cfg: reject unknown characters following '\'
authorJim Fehlig <jfehlig@suse.com>
Wed, 17 Feb 2016 17:20:57 +0000 (10:20 -0700)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 17 Feb 2016 17:34:33 +0000 (12:34 -0500)
commitcf1416a6e87b92430c0082d9bc98c3993fac4642
tree563f0f09c819aee8e0e7a73a78db60b39298fa96
parent5e486852ee85e53a0993381f4cc2e220271a621c
libxlu_cfg: reject unknown characters following '\'

When dequoting config strings in xlu__cfgl_dequote(), unknown
characters following a '\', and the '\' itself, are discarded.
E.g. a disk configuration string containing

  rbd:pool/image:mon_host=192.168.0.100\:6789

would be dequoted as

  rbd:pool/image:mon_host=192.168.0.1006789

Instead of discarding the '\' and unknown character, reject the
string and set error to EINVAL.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxlu_cfg.c